/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Thread;

import Images.RMImages;
import java.awt.ScrollPane;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

/**
 *
 * @author Oho
 */
public class ConnectImages extends Thread {

    ServerSocket sv = null;
    int port;
    JPanel scr;
    public ConnectImages(int port,JPanel sc) {
        this.port = port;
        this.scr=sc;

    }

    

    @Override
    public void run() {
        try {
            sv = new ServerSocket(port);
            while (true) {
                Socket sk = sv.accept();

                new RMImages(sk,scr).start();

                // Socket sk = sv.accept();
                // new  ThreadFile(sk).start();



            }
        } catch (IOException ex) {
            Logger.getLogger(ConnectFile_Tree.class.getName()).log(Level.SEVERE, null, ex);

        }
    }
}

